package com.xixiake.utils;

import android.text.TextUtils;

/**校验工具类
 *
 * Created by c-wanghengli on 2017/5/28.
 */
public class VerityUtils {

    /**
     * 校验手机号是否合法
     * @param phoneNo
     * @return
     */
    public static boolean verityPhoneNo(String phoneNo){
          String relGegex = "[1][3458]\\d{9}";
        if(TextUtils.isEmpty(phoneNo)){
            return false;
        }
        return phoneNo.matches(relGegex);
    }

    /**
     * 校验密码
     * @param password
     * @return
     */
    public static boolean verifyPassword(String password){
        if(password.length() >= 6 && password.length() <= 17){
            return true;
        }
        return false;
    }
}
